@IOS7_CHECKBOX_SIZE: 25px;
@IOS7_CHECKBOX_CHECKED_ICON_SIZE: 32px;
@IOS7_CHECKBOX_BORDER_RADIUS_ICON_SIZE: 3px;

.dx-checkbox {
    &.dx-state-active {
        .dx-checkbox-icon {
            background-color: @IOS7_CHECKBOX_ACTIVE_BACKGROUND;
        }
    }
}

.dx-checkbox-text {
    margin-left: -25px;
    padding-left: 30px;

    .dx-rtl &,
    .dx-rtl& {
        margin-right: -25px;
        padding-right: 30px;
    }
}

.dx-checkbox-icon {
    width: @IOS7_CHECKBOX_SIZE;
    height: @IOS7_CHECKBOX_SIZE;
    outline: 1px solid transparent;
    border: 1px solid @IOS7_CHECKBOX_BORDER;
    background-color: @IOS7_CHECKBOX_BACKGROUND_COLOR;
    .background-size-prop(100%);
    .border-radius(@IOS7_CHECKBOX_BORDER_RADIUS_ICON_SIZE);

    .dx-checkbox-checked & {
        .dx-icon-check;
        color: @IOS7_CHECKBOX_BACKGROUND_COLOR;
        .dx-icon-font-centered-sizing(@IOS7_CHECKBOX_CHECKED_ICON_SIZE);
    }

    .dx-checkbox-indeterminate & {
        &:before {
            content: '';
            width: 15px;
            height: 15px;
            background-color: @IOS7_CHECKBOX_BACKGROUND_COLOR;
            .border-radius(@IOS7_CHECKBOX_BORDER_RADIUS_ICON_SIZE);
            position: absolute;
            left: 4px;
            top: 4px;
        }
    }

    .dx-checkbox-indeterminate &,
    .dx-checkbox-checked & {
        background-color: @IOS7_CHECKBOX_CHECKED_BACKGROUND;

        .dx-state-active&  {
                &:before {
                    content: '';
                    background: none;
                }
        }
    }
}

.dx-state-disabled {
    &.dx-checkbox, .dx-checkbox {
        opacity: 0.5;
    }
}

.dx-invalid {
    .dx-checkbox-container {
        .dx-checkbox-icon {
            border: 1px solid @IOS7_FADED_INVALID_COLOR;
        }
    }

    &.dx-state-focused {
        .dx-checkbox-container {
            .dx-checkbox-icon {
                border-color: @IOS7_INVALID_COLOR;
            }
        }
    }
}
